<?php
/**
 * Created by PhpStorm.
 * User: mohuani
 * Date: 2019/4/14
 * Time: 22:24
 */

namespace App\Services;


use App\Utils\Util;

class BaseService
{
    /** @var Util|null  */
    protected static $util = null;

    /** @var object|\Redis|null  */
    protected static $redis = null;

    /**
     * GetWeatherByCityKeyJob constructor.
     */
    public function __construct()
    {
        // 初始化 $util，$redis对象
        if (self::$util == null) {
            self::$util = new Util();
        }

        if (self::$redis == null) {
            self::$redis = self::$util->getRedis();
        }
    }

}